package org.lanqiao.algo.elementary._05str;

/**
 * 判断A串是否B串的旋转字符串
 * defabd  fabdde -- true
 */
public class Case07_IsRotate {
    private static boolean isRotate(String a, String b) {
        if (a.length() != b.length())
            return false;
        // b+b
        return (b + b).contains(a);
    }

    public static void main(String[] args) {
        System.out.println(isRotate("defa", "fabdde"));
        System.out.println(isRotate("abc", "bca"));
    }
}
